1. Field
Exemplary embodiments of the present invention relate to semiconductor devices, and more particularly, to a counting circuit of a semiconductor device and a duty correction circuit of a semiconductor device that are implemented to the counting circuit of a semiconductor device.
2. Description of the Related Art
The duty cycle of a clock is the ratio of the duration that an input clock is at a high logic level, or a low logic level, to the total period of the input clock signal. A circuit for detecting the duty cycle of an input clock generates a value indicating that the duty of a period is larger or smaller than 50%, and a duty correction circuit performs an operation to correct the duty cycle of the input clock by using the value determined by the duty cycle detecting circuit to set the duty cycle of the input clock to 50%. The duty correction circuit controls the values of duty correction codes in response to the output signal of the circuit for detecting the duty cycle and drives the duty cycle so that the duty cycle of the input clock becomes 50%. More specifically, the duty correction circuit corrects the duty cycle of the input clock to a 50% duty cycle by controlling the values of the duty correction codes.
The duty correction codes may be controlled by, for example, a binary search method and a linear search method. The method used in a duty correction circuit is selected depending upon the locking time and the realization difficulty of the duty correction circuit and the size of an error likely to occur during an operation. In general, the binary search method has a short locking time, and the linear search method is realized easily.
First, in the binary search method, the values of the duty correction codes are changed by the unit of an exponent of 2 in a duty correction operation so that the duty cycle of the input clock becomes 50%.
More specifically, a process of initially correcting a duty error in the duty correction operation according to the binary search method is shown in FIG. 1. Assuming that the duty correction codes are composed of N bits, a duty error may be corrected by repeating a cycle N times. The duty error may be corrected in less than N cycles, but correcting the duty error in N cycles is the longest locking time. In this way, the locking time is short since the values of the duty correction codes in the duty correction operation are changed by a substantial amount. However, after the duty cycle of the input clock is corrected to 50% in the initial duty correction operation, the binary search method has a disadvantage because a substantial amount of change in the values of the duty cycle correction codes occurs even to detect a fine duty error. More specifically, as shown in FIG. 2, when performing an operation for to correct the error after the duty cycle of the input clock is corrected to 50%, a duty error is large while changing the values of the duty correction codes. The size of the duty error likely to occur during this process corresponds, at the maximum, to the value of the most significant bit of the duty correction codes, and increases as the correction range of the duty correction circuit increases.
Next, in the linear search method, the values of the duty correction codes are changed by the unit of the least significant bit in a duty correction operation so that the duty cycle of the input clock becomes 50%. A process of initially correcting a duty error according to the linear search method is shown in FIG. 3. Assuming that the duty correction codes are codes composed of N bits, a locking time in the linear search method becomes long due to the fact that a duty error may be corrected by repeating a cycle 2^N times.
More specifically, as shown in FIGS. 3 and 4, the linear search method has a disadvantage because the locking time is very long because the duty correction codes change by a small amount. However, the duty correction operation can be performed easily and quickly during an operation to correct the duty error occurring after the input clock was initially corrected to 50%.
To overcome the disadvantages described above, a circuit may be designed to implement both the binary search method and the linear search method. The circuit may select which of the two correction methods are selected for correcting the duty error. Nevertheless, a circuit implementing both the binary search method and the linear search method may have additional complexity.